/*
package com.itheima.tanhua.admin.controller;

import com.itheima.model.vo.MovementsHVo;
import com.itheima.model.vo.PageResultM;
import com.itheima.tanhua.admin.service.ManageService;

import org.bson.types.ObjectId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/manage")
public class ManageContrlller {


    @Autowired
    private ManageService messagesService;

    //探花后台mastage /messages/pass
    @PostMapping("/messages/pass")
    public ResponseEntity pass(@RequestBody String[] item){



        Map<String,String> map  = messagesService.pass(item);



        return ResponseEntity.ok(map);
    }

    //探花后台拒绝策略
    @PostMapping("/messages/reject")
    public ResponseEntity reject(@RequestBody String[] item){

        Map<String,String> map  = messagesService.reject(item);

        return ResponseEntity.ok(map);






    }

    //探花后台撤销策略
    @PostMapping("/messages/revocation")
    public ResponseEntity revocation(@RequestBody String[] item){

        Map<String,String> map  = messagesService.revocation(item);
        return ResponseEntity.ok(map);
    }


    //探花后台消息详情接口
    @GetMapping("/messages/{id}")
    public ResponseEntity messages(@PathVariable ObjectId id){
        //直接掉方法
        MovementsHVo movementsHVo = messagesService.messages(id);
        return ResponseEntity.ok(movementsHVo);
    }


    //消息置顶
    @PostMapping("/messages/{id}/top")
    public ResponseEntity top(@PathVariable ObjectId id){
        //
        Map<String,String> map = messagesService.top(id);
        return ResponseEntity.ok(map);
    }

    //消息取消置顶
    @PostMapping("/messages/{id}/untop")
    public ResponseEntity uptop(@PathVariable ObjectId id){
        //
        Map<String,String> map = messagesService.untop(id);
        return ResponseEntity.ok(map);
    }

    //分页查询置顶
    @GetMapping("/messages")
    public ResponseEntity messagess(int page,int pagesize, String sortProp, String sortOrder,String id,Long sd,long ed
            ,Long uid, int state){

        PageResultM messages = messagesService.getmeassagelist(page, pagesize, sortProp, sortOrder, id, sd, ed, uid, state, "Messages");
        return ResponseEntity.ok(messages);
    }

}
*/
